/**
 * 
 */
package org.chengsen.service;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.chengsen.dao.UserDAO;
import org.chengsen.dataobject.UserDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Jason.zhang
 * 
 */
@Service
@Transactional
public class HelloServiceImpl implements HelloService {
	@Autowired
	private UserDAO userDAO;

	@Override
	public UserDO getUser(@NotNull @Min(1) Integer id) {
		return userDAO.getUser(id);
	}

	public void setUserDAO(@NotNull UserDAO userDAO) {
		this.userDAO = userDAO;
	}

}
